|
|
|
|
|
|
|
Figure 1.22
Example program RubrBox lets you select
rectangles with a dotted rubberband box. |
|
|
|
|
|
|
|
|
Notice that there is some inconsistency in the names of these values. Visual Basic has other constants, vbTransparent and vbSolid, so the first two values have an extra FS at the beginning of their names to differentiate them from those other values. If you want to draw a transparent shape and the shape is filled, you probably have used vbTransparent, which has a value of 0, instead of vbFSTransparent, which has a value of 1. |
|
|
|
|
|
|
|
|
Example program Fills, shown in Figure 1.24, displays rectangles filled in each of these styles. |
|
|
|
|
|
|
|
|
The effects of vbUpwardDiagonal and vbDownwardDiagonal may seem strange. You would probably think of upward diagonal as meaning a slant upward from left to right, rather than from right to left. The Visual Basic interpretations make sense if you think about the standard pixel coordinate system. Here X increases from left to right, and Y increases from top to bottom. Then a line slanting upward from right to left on the screen has increasing Y values as X values increase. |
|
|
|
|
|
|
|
|
Figure 1.23
Visual Basic does not honor the DrawStyle property when
DrawWidth is greater than 1. |
|
|
|
|
|